#!/usr/local/bin/python3
# -*- coding:utf8 -*-
# Author Aaron 
# 2017-04-16 17:46:48
import RPi.GPIO as GPIO
import time

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
pin = 7
led = 37
GPIO.setup(pin, GPIO.IN)
GPIO.setup(led, GPIO.OUT,initial=GPIO.LOW)
while True:
    if GPIO.input(pin) == GPIO.LOW:
        print("hello   ")
        GPIO.output(led,GPIO.HIGH)
        time.sleep(1)
        GPIO.output(led,GPIO.LOW)

GPIO.cleanup()
